package com.lvan.schedule.task;

import java.util.concurrent.ScheduledFuture;

/**
 * Schedule Controller Class
 */
public final class ScheduledTask {

    public volatile ScheduledFuture<?> future;

    /**
     * cancel Schedule task
     *
     * @return Boolean
     */
    public boolean cancel() {
        ScheduledFuture<?> future = this.future;
        if (future != null) {
            return future.cancel(true);
        }
        return false;
    }
}
